import request from '@/utils/request'

// 获取员工列表
export function getEmployeeListAPI(params) {
  return request({
    url: '/sys/user',
    params
  })
}

// 删除员工
export function delEmployeeAPI(id) {
  return request({
    method: 'DELETE',
    url: `/sys/user/${id}`
  })
}

// 增加员工
export function addEmployeeAPI(data) {
  return request({
    method: 'POST',
    url: '/sys/user',
    data
  })
}

// 批量导入员工
export function importEmployeeAPI(data) {
  return request({
    method: 'POST',
    url: '/sys/user/batch',
    data
  })
}

// 为用户分配角色
export function assignRolesAPI(data) {
  return request({
    url: '/sys/user/assignRoles',
    data,
    method: 'PUT'
  })
}

